#include "../../inc/cbb_camera_type.h"
#include "../../inc/cbb_camera_comm.h"

/**
 * @brief 查询摄像头支持的像素格式
 * @param handle 摄像头句柄
 * @param operate_p 返回数据保存的结构体指针
 * @return 成功返回 CBB_CAMERA_ACK_OK 失败返回CBB_CAMERA_ACK_ERROR
 */
CbbCameraAckE_t CbbCameraQuePixelFormat(CameraHandle handle, CbbCameraCtrlDev_t *operate_p);

/**
 * @brief 查询摄像头所有信息
 * @param handle 摄像头句柄
 * @param operate_p 返回数据保存的结构体指针
 * @return 成功返回 CBB_CAMERA_ACK_OK 失败返回CBB_CAMERA_ACK_ERROR 
 */
CbbCameraAckE_t CbbCameraQueAllInfo(CameraHandle handle, CbbCameraCtrlDev_t *operate_p);

/**
 * @brief 配置摄像头参数
 * @param handle 摄像头句柄
 * @param operate_p 摄像头参数结构体指针
 * @return 成功返回 CBB_CAMERA_ACK_OK 失败返回CBB_CAMERA_ACK_ERROR 
 */
CbbCameraAckE_t CbbCameraSetConf(CameraHandle handle, CbbCameraCtrlDev_t *operate_p);

/**
 * @brief 控制摄像头采集
 * @param handle 摄像头句柄
 * @param operate_p 控制参数保存信息,参考CbbCameraStatE_t
 * @return 成功返回 CBB_CAMERA_ACK_OK 失败返回CBB_CAMERA_ACK_ERROR 
 */
CbbCameraAckE_t CbbCameraCtrlFlow(CameraHandle handle, CbbCameraCtrlDev_t *operate_p);

CbbCameraAckE_t CbbStartCapture(CameraHandle handle);

CbbCameraAckE_t CbbStopCapture(CameraHandle handle);

CbbCameraAckE_t CbbReadFrameData(CameraHandle handle, CbbCameraFrame_t *frame, hd_u16_t timeout_ms);

CbbCameraAckE_t CbbResetBuffer(CameraHandle handle, CbbCameraFrame_t frame, hd_u16_t index);